package bus

import (
	"ay-activity/models/rename"
	"ay-activity/utils/tools"
	"fmt"
)

type FileRenameService struct {
}

func (f FileRenameService) Rename(req rename.RenameReq) int {
	path := req.Path
	if path == "" {
		fmt.Println("请选择目录")
		return 0
	}
	return tools.RenameFiles(path, req.Prefix, req.TargetExt, req.ExcludeExt)
}
